package com.zenithmind.exam.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 题目VO
 * 
 * @author ZenithMind
 * @since 2024-07-01
 */
@Data
@Schema(name = "题目VO", description = "题目视图对象")
public class QuestionVO {

    /**
     * 题目ID
     */
    @Schema(description = "题目ID")
    private String id;

    /**
     * 题库ID
     */
    @Schema(description = "题库ID")
    private String bankId;

    /**
     * 题库名称
     */
    @Schema(description = "题库名称")
    private String bankName;

    /**
     * 题目标题
     */
    @Schema(description = "题目标题")
    private String title;

    /**
     * 题目内容
     */
    @Schema(description = "题目内容")
    private String content;

    /**
     * 题目类型（1:单选题, 2:多选题, 3:填空题, 4:简答题, 5:判断题）
     */
    @Schema(description = "题目类型（1:单选题, 2:多选题, 3:填空题, 4:简答题, 5:判断题）")
    private Integer type;

    /**
     * 题目类型名称
     */
    @Schema(description = "题目类型名称")
    private String typeName;

    /**
     * 难度等级（1:简单, 2:中等, 3:困难）
     */
    @Schema(description = "难度等级（1:简单, 2:中等, 3:困难）")
    private Integer difficulty;

    /**
     * 难度名称
     */
    @Schema(description = "难度名称")
    private String difficultyName;

    /**
     * 题目分值
     */
    @Schema(description = "题目分值")
    private Integer score;

    /**
     * 选项列表（适用于选择题）
     */
    @Schema(description = "选项列表（适用于选择题）")
    private List<String> options;

    /**
     * 正确答案（仅在查看答案时显示）
     */
    @Schema(description = "正确答案")
    private List<String> correctAnswer;

    /**
     * 答案解析
     */
    @Schema(description = "答案解析")
    private String explanation;

    /**
     * 标签列表
     */
    @Schema(description = "标签列表")
    private List<String> tags;

    /**
     * 图片URLs
     */
    @Schema(description = "图片URLs")
    private List<String> imageUrls;

    /**
     * 附件URLs
     */
    @Schema(description = "附件URLs")
    private List<String> attachmentUrls;

    /**
     * 状态（0:禁用, 1:启用, 2:审核中）
     */
    @Schema(description = "状态（0:禁用, 1:启用, 2:审核中）")
    private Integer status;

    /**
     * 状态名称
     */
    @Schema(description = "状态名称")
    private String statusName;

    /**
     * 使用次数
     */
    @Schema(description = "使用次数")
    private Long useCount;

    /**
     * 正确次数
     */
    @Schema(description = "正确次数")
    private Long correctCount;

    /**
     * 正确率
     */
    @Schema(description = "正确率")
    private BigDecimal correctRate;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 错误次数（错题本相关）
     */
    @Schema(description = "错误次数")
    private Integer wrongCount;

    /**
     * 最后错误时间（错题本相关）
     */
    @Schema(description = "最后错误时间")
    private LocalDateTime lastWrongTime;

    /**
     * 是否已掌握（错题本相关）
     */
    @Schema(description = "是否已掌握")
    private Boolean isMastered;
}
